package szkeleton;
import java.awt.Dimension;
import java.awt.Graphics;
import java.awt.Graphics2D;

import javax.swing.*;

public class Canvas extends JPanel
{
	private View view;
	
	public Canvas(View v, int width, int height)
	{
		super(null,true);
		this.setPreferredSize(new Dimension(width, height));
		view=v;
		
	}
	@Override
	public void paintComponent(Graphics g)
	{
		super.paintComponent(g);
		Graphics2D g2d = (Graphics2D)g;
		view.updateView(g2d);
	}

}
